import { Modal } from "antd";
import React from "react";

const DIalog = ({
  render,
  title,
  dialogStatus,
  setDialogStatus,
  width = 600,
}: any) => {
  return (
    <Modal
      title={title}
      footer={null}
      width={width}
      onCancel={() => setDialogStatus(false)}
      closable={true}
      centered={true}
      open={dialogStatus}
    >
      {render()}
    </Modal>
  );
};

export default DIalog;
